package com.dsg.entity.bank;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 銀行往來過數檔案
 * </p>
 *
 * @author system
 * @since 2020-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dsg_bank_record")
@ApiModel(value = "DsgBankRecord对象", description = "銀行往來過數檔案")
public class DsgBankRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("OID")
    private String oid;

    @ApiModelProperty(value = "過數方式")
    @TableField("COUNT_MODE")
    private String countMode;

    @ApiModelProperty(value = "收款銀行编号")
    @TableField("ACCOUNT_NO")
    private String accountNo;

    @ApiModelProperty(value = "收款銀行编号")
    @TableField("ACCOUNT_BANK")
    private String accountBank;

    @ApiModelProperty(value = "交易總金額")
    @TableField("TOTAL_TRAN_AMOUNT")
    private BigDecimal totalTranAmount;

    @ApiModelProperty(value = "交易總筆數")
    @TableField("TOTAL_TRAN_NUMBER")
    private Integer totalTranNumber;

    @ApiModelProperty(value = "成功總金額")
    @TableField("SUCC_TRAN_AMOUNT")
    private BigDecimal succTranAmount;

    @ApiModelProperty(value = "成功總筆數")
    @TableField("SUCC_TRAN_NUMBER")
    private Integer succTranNumber;

    @ApiModelProperty(value = "失敗總金額")
    @TableField("FAIL_TRAN_AMOUNT")
    private BigDecimal failTranAmount;

    @ApiModelProperty(value = "失敗總筆數")
    @TableField("FAIL_TRAN_NUMBER")
    private Integer failTranNumber;

    @ApiModelProperty(value = "狀態")
    @TableField("STATUS")
    private Integer status;

    @ApiModelProperty(value = "上午/下午")
    @TableField("DAY_OR")
    private Integer dayOr;

    /**
     * 企業編號
     */
    @TableField("ENT_CODE")
    @ApiModelProperty(value = "企業編號", name = "entCode")
    private String entCode;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATER")
    private String creater;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("UPDATER")
    private String updater;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATE_TIME")
    private Date updateTime;

    /************************查詢條件*******************/
    @ApiModelProperty(value = "開始日期")
    @TableField(exist = false)
    private String beginDate;

    @ApiModelProperty(value = "結束日期")
    @TableField(exist = false)
    private String endDate;

    @ApiModelProperty(value = "创建日期")
    @TableField(exist = false)
    private String createDate;

    /************************枚舉**********************/
    public enum AppStatus {
        entered(0), generated(1), remitted(2), success(3), failure(4),
        newGeneration(1), settledBank(2), complete(3);
        Integer code;

        AppStatus(int code) {
            this.code = code;
        }

        public Integer getCode() {
            return code;
        }
    }
}
